﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<link href="~/Content/css/clockpicker/bootstrap-clockpicker.min.css" rel="stylesheet" />
<link href="~/Content/css/clockpicker/bootstrap.css" rel="stylesheet" />
<script src="~/Content/js/clockpicker/bootstrap.min.js"></script>
<script src="~/Content/js/clockpicker/bootstrap-clockpicker.min.js"></script>
<script>
    var keyValue = $.request("keyValue");
    var SiteId = $.request("SiteId");
    var filesdata=[];
    var photodata=[];
    $(function () {
        getItemList();
        if ($.request("id") != null) {
            $("#F_SiteId").val($.request("SiteId"))
        }
        if (!!keyValue) {
            $.ajax({
                url: "/SiteManage/Space/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data.spaceEntity);
                    $("#form2").formSerialize(data.marketEntity);
                    if (data.spaceEntity.F_StoreType) {
                        var F_StoreType = data.spaceEntity.F_StoreType.split(',');
                        $("#F_StoreType").val(F_StoreType).trigger("change");
                    }
                    if (data.spaceEntity.F_GuestType) {
                        var F_GuestType = data.spaceEntity.F_GuestType.split(',');
                        $("#F_GuestType").val(F_GuestType).trigger("change");
                    }

                    filesdata = data.FilesList;
                    $("#imgrq").empty();
                    for (var i = 0, j = data.FilesList.length; i < j; i++) {
                        $("#imgrq").append("<a  href=\"" + "http://storage.yunspace.com.cn/" + data.FilesList[i].path + "\">" +
                            data.FilesList[i].name + "</a><a class='filedel' onclick=\"btn_delete_files('" + data.FilesList[i].F_Id + "')\">删除</a><br>");
                    }
                    photodata = data.PhotosList;
                    $("#photoList").empty();
                    for (var i = 0, j = photodata.length; i < j; i++) {
                        var cha = "";
                        if (photodata[i].is_cover) {
                            cha = "checked";
                        }
                        $("#photoList").append("<div class='imgList'><img src=\"" + "http://storage.yunspace.com.cn/"
                            + photodata[i].path + "\" style= 'width:120px; height:100px;' /><input type='text' id='"
                            + photodata[i].F_Id + "' class='form-control imgtag' value='" + photodata[i].tag
                            + "' placeholder='参考：外观图1 / 控制台' /><div><input type='radio' class='rdio' "+ cha +" value='" + photodata[i].F_Id
                            + "' name='is_cover' value='' />首图<a class='photodel' onclick=\"btn_delete_files('" + photodata[i].F_Id + "')\">删除</a></div></div >");
                    }

                }
            });
        }

        $("#filesf").change(function () {
            $("#imgrq1").empty();
            for (var i = 0, j = this.files.length; i < j; i++) {
                $("#imgrq1").append("<a  href=\"" + window.URL.createObjectURL(this.files[i]) + "\">" +
                    this.files[i].name + "</a><span class='filedel'>待提交</span><br>");
            }
        });
        $("#PhotoFile").change(function () {
            $("#displaydiv").empty();
            for (var i = 0, j = this.files.length; i < j; i++) {
                $("#displaydiv").append("<img alt='" + this.files[i].name + "'  src=\"" + window.URL.createObjectURL(this.files[i]) + "\">");
            }
        });
    });
    function btn_delete_files(F_Id,type) {
        $.deleteForm({
            url: "/SiteManage/Photos/DeleteForm",
            param: { keyValue: F_Id },
            success: function () {
                if (type == "SpaceFiles") {
                    $("#imgrq").empty();
                    if (filesdata.length > 1) {
                        for (var i = 0, j = filesdata.length; i < j; i++) {
                            if (filesdata[i].F_Id == F_Id) {
                                delete filesdata[i];
                            }
                            else {
                                $("#imgrq").append("<a  href=\"" + "http://storage.yunspace.com.cn/" + filesdata[i].path + "\">" +
                                    filesdata[i].name + "</a><a class='filedel' onclick=\"btn_delete_files('" + filesdata[i].F_Id + "')\">删除</a><br>");
                            }
                        }
                    }
                } else {
                    $("#photoList").empty();
                    if (photodata.length > 1) {
                        for (var i = 0, j = photodata.length; i < j; i++) {
                            if (photodata[i].F_Id == F_Id) {
                                delete photodata[i];
                            }
                            else {
                                var cha = "";
                                if (photodata[i].is_cover) {
                                    cha = "checked";
                                }
                                $("#photoList").append("<div class='imgList'><img src=\"" + "http://storage.yunspace.com.cn/"
                                    + photodata[i].path + "\" style= 'width:120px; height:100px;' /><input type='text' id='"
                                    + photodata[i].F_Id + "' class='form-control imgtag' value='" + photodata[i].tag
                                    + "' placeholder='参考：外观图1 / 控制台' /><div><input type='radio' class='rdio' " + cha +" id='radio" + photodata[i].F_Id
                                    + "' name='is_cover' value='' />首图<a class='photodel' onclick=\"btn_delete_files('" + photodata[i].F_Id + "')\">删除</a></div></div >");
                            }
                        }
                    }
                }
            }
        })
    }

    var TagList = [];
    function updatePhotoTag() {
        var PhotoTagsValue;
        $("#photoList input[type='text']").each(function () {
            var queryJson = {
                F_Id: '',
                tag: '',
                is_cover: false
            }
            queryJson.F_Id = this.id;
            queryJson.tag = $(this).val();
            if (queryJson.F_Id == $("input[name='is_cover']:checked").val())
                queryJson.is_cover = true;
            else
                queryJson.is_cover = false;
            TagList.push(queryJson);
        });
    }

    var xhr;
    var cvalue = "";
    var bigvlue = "";

    //批量上传资料文件
    function uploadSend(actionId, type) {
        var data = new FormData();
        var item = document.getElementById(actionId);
        if (item != null && item.files.length > 0) {
            var files = item.files;
            if (type == "SpaceFiles") {
                for (var i = 0; i < files.length; i++) {
                    var file = item.files[i];
                    fileSize = file.size;
                    fileSize = Math.round(fileSize / 1024 * 100) / 100; //kb
                    if (fileSize > 30720) {
                        bigvlue += file.name + ' ';
                        return false;
                    }
                    data.append(file.name, file);
                }
            }
            else {
                for (var i = 0; i < files.length; i++) {
                    var file = item.files[i];
                    fileSize = file.size;
                    fileSize = Math.round(fileSize / 1024 * 100) / 100; //kb
                    if (!createReader(i)) {
                        cvalue += file.name +" ";
                    }
                    else {
                        if (fileSize > 10240) {
                            bigvlue += file.name + ' ';
                        } else {
                            data.append(file.name, file);
                        }
                    }
                }
            }
            xhr = new XMLHttpRequest();
            xhr.onload = function () {
                data = JSON.parse(xhr.responseText);
            };
            xhr.onerror = function (err) {
                console.error(err);
            };
            xhr.onreadystatechange = zswFun;  //调用回调函数
            xhr.open('post', '/SiteManage/Site/UploadPathFiles?sitename=' + $("#title").val() + '&type=' + type + '&keyvalue=' + keyValue, true);
            xhr.send(data);
        }
        else {
            $.modalAlert("请先选择您要上传的文件！", "warning");
        }
    }
    function createReader(i) {
        var divs = document.getElementById("displaydiv");
        var imgs = divs.getElementsByTagName("img");
        if (imgs.length > 0) {
            var w = imgs[i].width;
            var h = imgs[i].height;
            if (w < h) {
                return false;
            }
            else {
                return true;
            }
        }
    }
    //回调函数
    function zswFun(type) {
        var big = type == "Space" ? 10 : 30;
        if (xhr.readyState == 4 && xhr.status == 200) {
            var b = eval('(' + xhr.responseText + ')');
            if (b.state == "1") {
                if (cvalue != "" && bigvlue != "") {
                    $.modalAlert(cvalue + "图片比例不对，请提供长宽比为4:3的常规横向展示照片," + bigvlue + "超过了限制大小,请上传" + big +"MB内的文件", "warning");
                }
                else if (bigvlue != "") {
                    $.modalAlert( bigvlue + "超过了限制大小,请上传" + big + "MB内的文件", "warning");
                }
                else if (cvalue != "") {
                    $.modalAlert(cvalue + "图片比例不对，请提供长宽比为4:3的常规横向展示照片", "warning");
                } else {
                    $.modalAlert("资料保存成功!", "warning");
                }
                $.reload();
                var file = document.getElementById("filesf");
                // for IE, Opera, Safari, Chrome
                if (file.outerHTML) {
                    file.outerHTML = file.outerHTML;
                } else { // FF(包括3.5)
                    file.value = "";
                }
            } else {
                if (cvalue != "" && bigvlue != "") {
                    $.modalAlert(cvalue + "图片比例不对，请提供长宽比为4:3的常规横向展示照片," + bigvlue + "超过了限制大小,请上传" + big + "MB内的文件", "warning");
                }
                else if (bigvlue != "") {
                    $.modalAlert(bigvlue + "超过了限制大小,请上传" + big + "MB内的文件", "warning");
                }
                else if (cvalue != "") {
                    $.modalAlert(cvalue + "图片比例不对，请提供长宽比为4:3的常规横向展示照片", "warning");
                } else {
                    $.modalAlert("上传失败！", "warning");
                }
            }
        }
    }
    function getItemList() {
        $.ajax({
            url: "/SiteManage/Site/GetItemListJson",
            dataType: "json",
            async: false,
            success: function (data) {
                initControl(data)
            }, error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

    function initControl(ItemList) {
        var SiteState = ItemList.SiteState;
        for (var i = 0; i < SiteState.length; i++) {
            $("#state").append("<option value='" + SiteState[i].F_ItemCode + "'>" + SiteState[i].F_ItemName + "</option>");
        }
        $("#state").bindSelect()//上线状态
        var units = ItemList.units
        for (var i = 0; i < units.length; i++) {
            $("#units").append("<option value='" + units[i].F_ItemCode + "'>" + units[i].F_ItemName + "</option>");
        }
        $("#units").bindSelect()//价格单位

        var Subscription_Type = ItemList.Subscription_Type
        for (var i = 0; i < Subscription_Type.length; i++) {
            $("#F_Subscription_Type").append("<option value='" + Subscription_Type[i].F_ItemCode + "'>" + Subscription_Type[i].F_ItemName + "</option>");
        }
        //使用特点
        var SiteTrait = ItemList.SiteTrait;
        for (var i = 0; i < SiteTrait.length; i++) {
            $("#F_Tags").append("<option value='" + SiteTrait[i].F_ItemCode + "'>" + SiteTrait[i].F_ItemName + "</option>");
        }
        //人均消费
        var AverageConsumer = ItemList.AverageConsumer;
        for (var i = 0; i < AverageConsumer.length; i++) {
            $("#F_Average_Consumer").append("<option value='" + AverageConsumer[i].F_ItemCode + "'>" + AverageConsumer[i].F_ItemName + "</option>");
        }
        //商场定位
        var StoreType = ItemList.StoreType;
        for (var i = 0; i < StoreType.length; i++) {
            $("#F_StoreType").append("<option value='" + StoreType[i].F_ItemCode + "'>" + StoreType[i].F_ItemName + "</option>");
        }
        //客群定位
        var GuestType = ItemList.GuestType;
        for (var i = 0; i < GuestType.length; i++) {
            $("#F_GuestType").append("<option value='" + GuestType[i].F_ItemCode + "'>" + GuestType[i].F_ItemName + "</option>");
        }
        $("#F_Tags").bindSelect();
        $("#F_Average_Consumer").bindSelect();
        $("#F_StoreType").bindSelect();
        $("#F_GuestType").bindSelect();
        $("#F_Subscription_Type").bindSelect();//订金收取方式

        //加载下拉控件
        $("#quote_explain").bindSelect();
        $("#through_three_areas").bindSelect();
        $("#vehicle").bindSelect();
        $("#Is_night_build").bindSelect();
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
        var email = /^[A-Za-z0-9\u4e00-\u9fa5]+@@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
        if (!mobile.test($("#phone").val())) {
            $.modalAlert("手机号格式不正确", "warning");
            return false;
        } if (!email.test($("#email").val())) {
            $.modalAlert("邮箱格式不正确", "warning");
            return false;
        }
        updatePhotoTag();
        var params = {
            spaceOutput: JSON.stringify({
                spaceEntity: $("#form1").formSerialize(),//空间信息
                marketEntity: $("#form2").formSerialize(),//商场信息
                photosList: TagList//图片
            })
        };
        console.log(JSON.stringify(params));
        $.submitForm({
            url: "/SiteManage/Space/SubmitForm?keyValue=" + keyValue,
            param: params,
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
    function btn_add() {
        $.modalOpen({
            id: "SpacePhotosForm",
            title: "上传空间图片",
            url: "/SiteManage/Photos/Form?photoable_id=" + keyValue + "&photoable_type=Space",
            width: "700px",
            height: "440px",
            callBack: function (iframeId) {
                top.frames[iframeId].submitForm();
            }
        });
    }
    function btn_edit() {
        var keyValue = $("#gridList").jqGridRowValue().F_Id;
        $.modalOpen({
            id: "SpacePhotosEdit",
            title: "修改空间图片",
            url: "/SiteManage/Photos/Form?keyValue=" + keyValue,
            width: "700px",
            height: "440px",
            callBack: function (iframeId) {
                top.frames[iframeId].submitForm();
            }
        });
    }
    function btn_delete() {
        $.deleteForm({
            url: "/SiteManage/Photos/DeleteForm",
            param: { keyValue: $("#gridList").jqGridRowValue().F_Id },
            success: function () {
                $("#gridList").resetSelection();
                $("#gridList").trigger("reloadGrid");
            }
        })
    }
    function btn_details() {
        var keyValue = $("#gridList").jqGridRowValue().F_Id;
        $.modalOpen({
            id: "SpacePhotosDetails",
            title: "查看空间图片",
            url: "/SiteManage/Photos/Details?keyValue=" + keyValue,
            width: "700px",
            height: "490px",
            btn: null,
        });
    }
</script>

<style>
    input {
        font-size: 12px !important;
    }

    .formTitle {
        font-size: 12px !important;
    }

    .filedel {
        margin-left: 20px;
        color: red;
    }
    .photodel {
        margin-left: 40px;
        color: red;
    }
    .imgtag {
        width: 120px !important;
        height: 20px !important;
        text-align: center;
        margin-top: 10px;
    }
    .imgList {
        float: left;
        width: 120px;
        height: 150px;
        margin: 10px;
        text-align:center;
    }
</style>
<form id="form1">
    <div style="padding-top: 20px;margin-left:5px">
        <table class="form">
            <tr>
                <td colspan="6" class="interval">联系人信息</td>
            </tr>
            <tr>
                <th class="formTitle">联系人<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="contact" name="contact" type="text" class="form-control required" placeholder="请录入联系人" />
                </td>
                <th class="formTitle">手机号<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="phone" name="phone" type="text" class="form-control required" placeholder="请录入手机号" />
                </td>
                <th class="formTitle">座机</th>
                <td class="formValue">
                    <input id="telephone" name="telephone" type="text" class="form-control" placeholder="请录入座机" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">邮箱<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="email" name="email" type="text" class="form-control required" placeholder="请录入邮箱" />
                </td>
                <th class="formTitle">联系人职位</th>
                <td class="formValue">
                    <input id="contact_position" name="contact_position" type="text" class="form-control" placeholder="请录入联系人职位" />
                </td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td colspan="6" class="interval">空间信息</td>
            </tr>
            <tr>
                <th class="formTitle">空间名称<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="title" name="title" type="text" class="form-control required" placeholder="请录入空间名称" />
                </td>
                <th class="formTitle">归属场地<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="F_SiteId" name="F_SiteId" disabled="disabled" type="text" class="form-control required" placeholder="请录入场地id" />
                </td>
                @*<th class="formTitle">上线状态<span style="color:red">*</span></th>
                <td class="formValue">
                    <select id="state" name="state" class="form-control required">
                        <option value="">==请录入上线状态==</option>
                    </select>
                </td>*@
            </tr>
            <tr>
                <th class="formTitle">可使用面积（平米）<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="area" name="area" type="number" class="form-control required" placeholder="参考填写：300" />
                </td>
                <th class="formTitle">空间层高（米）<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="height" name="height" type="number" class="form-control required" placeholder="参考填写：6" />
                </td>
                <th class="formTitle">可搭建高度(米)<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="limit_height" name="limit_height" type="text" class="form-control required" placeholder="请录入可搭建高度" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">长*宽(米）(秀场必填)</th>
                <td class="formValue">
                    <input id="length_width" name="length_width" type="text" class="form-control" placeholder="参考填写：50*40" />
                </td>
                <th class="formTitle">地面称重（KG/平米）</th>
                <td class="formValue">
                    <input id="accept_weight" name="accept_weight" type="text" class="form-control" placeholder="参考填写：300" />
                </td>
                <th class="formTitle">最大容纳人数（人）<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="max_seating_capacity" name="max_seating_capacity" type="number" class="form-control required" placeholder="参考填写：500" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">落位区域</th>
                <td class="formValue">
                    <select id="through_three_areas" name="through_three_areas" class="form-control required">
                        <option value="">==请选择==</option>
                        <option value="室内">室内</option>
                        <option value="室外">室外</option>
                        <option value="半开放式">半开放式</option>
                    </select>
                </td>
                <th class="formTitle">空间标签</th>
                <td class="formValue">
                    <select id="F_Tags" name="F_Tags" class="form-control required">
                        <option value="">==请选择==</option>
                    </select>
                    @*<input id="F_Tags" name="F_Tags" type="text" class="form-control" placeholder="多个标签可用空格隔开" />*@
                </td>
                <th class="formTitle">所处楼层<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="current_floor" name="current_floor" type="text" class="form-control required" placeholder="参考填写：B1/B2/1F/2F" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">可否进车</th>
                <td class="formValue">
                    @*<input id="vehicle" name="vehicle" type="text" class="form-control" placeholder="请录入可否进车" />*@
                    <select id="vehicle" name="vehicle" class="form-control required">
                        <option value="">==请选择==</option>
                        <option value="是">是</option>
                        <option value="否">否</option>
                    </select>
                </td>
                <th class="formTitle">进出口限高（米）</th>
                <td class="formValue">
                    <input id="exit_limit" name="exit_limit" type="number" class="form-control" placeholder="参考填写：5" />
                </td>
                <th class="formTitle">进出口限宽（米）</th>
                <td class="formValue">
                    <input id="exit_width" name="exit_width" type="number" class="form-control" placeholder="参考填写：5" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">空间吊顶(KG/个)</th>
                <td class="formValue">
                    <input id="ceiling" name="ceiling" type="number" class="form-control" placeholder="参考填写：200" />
                </td>
                <th class="formTitle">吊点数(个)</th>
                <td class="formValue">
                    <input id="some_digits" name="some_digits" type="number" class="form-control" placeholder="参考填写：10" />
                </td>
                <th class="formTitle">最大吊点总承重数（KG）</th>
                <td class="formValue">
                    <input id="largest_digits" name="largest_digits" type="number" class="form-control" placeholder="参考填写：500" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">供电量(千瓦)</th>
                <td class="formValue">
                    <input id="power_supply" name="power_supply" type="text" class="form-control" placeholder="参考填写：200" />
                </td>
                <th class="formTitle">网络(兆)</th>
                <td class="formValue">
                    <input id="network" name="network" type="number" class="form-control" placeholder="参考填写：500" />
                </td>
                <th class="formTitle">固定的座位数（个）</th>
                <td class="formValue">
                    <input id="Fixed_Seat_Number" name="Fixed_Seat_Number" type="number" class="form-control" placeholder="参考填写：3000" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">平日人流量</th>
                <td class="formValue"><input id="visitors" name="visitors" type="text" class="form-control" placeholder="参考填写：50000" /></td>
                <th class="formTitle">周末人流量</th>
                <td class="formValue"><input id="weekend_flow" name="weekend_flow" type="text" class="form-control" placeholder="参考填写：70000" /></td>
            </tr>
            @*<tr>
                <th class="formTitle">能耗说明（电费）</th>
                <td class="formValue" colspan="5">
                    <input id="property_fee" name="property_fee" type="text" class="form-control" placeholder="参考填写：2元/度  3000元/场  单次单议" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">能耗说明（水费）</th>
                <td class="formValue" colspan="5">
                    <input id="cost_water" name="cost_water" type="text" class="form-control" placeholder="参考填写：2元/立方米  3000元/场  单次单议" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">能耗说明（网费）</th>
                <td class="formValue" colspan="5">
                    <input id="cost_Network" name="cost_Network" type="text" class="form-control" placeholder="参考填写：2元/M  300元/场  单次单议" />
                </td>
            </tr>*@
            @*<tr>
                <th class="formTitle">保洁费用</th>
                <td class="formValue">
                    <input id="cost_Cleaning" name="cost_Cleaning" type="text" class="form-control" placeholder="参考填写：2000元/场" />
                </td>
                <th class="formTitle">安保费用</th>
                <td class="formValue">
                    <input id="cost_security" name="cost_security" type="text" class="form-control" placeholder="参考填写：2000元/场" />
                </td>
                <th class="formTitle">其他杂费</th>
                <td class="formValue">
                    <input id="cost_Other" name="cost_Other" type="text" class="form-control" placeholder="参考填写：空调费2000元/小时不含电费，LED2000元/场" />
                </td>
            </tr>*@
            @*<tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    报批费用预估
                </th>
                <td class="formValue" colspan="5">
                    <textarea id="cost_approval_forecast" name="cost_approval_forecast" class="form-control" placeholder="参考填写：明星类无演出报批2000元/场"></textarea>
                </td>
            </tr>*@
            <tr>
                <th class="formTitle">可进场时间</th>
                <td class="formValue">
                    <div class="input-group clockpicker" data-autoclose="true">
                        <input id="deposit_time" name="deposit_time" type="text" class="form-control" placeholder="请录入可进场时间">
                        <span class="input-group-addon">
                            <span class="glyphicon glyphicon-time"></span>
                        </span>
                    </div>
                </td>
                <th class="formTitle">可搭建时间</th>
                <td class="formValue">
                    <div class="input-group clockpicker" data-autoclose="true">
                        <input id="build_time" name="build_time" type="text" class="form-control" placeholder="请录入可搭建时间">
                        <span class="input-group-addon">
                            <span class="glyphicon glyphicon-time"></span>
                        </span>
                    </div>
                </td>
                <th class="formTitle">是否可以通宵搭建</th>
                <td class="formValue">
                    <select id="Is_night_build" name="Is_night_build" class="form-control">
                        <option value="">==请录入是否可以通宵搭建==</option>
                        <option value="true">是</option>
                        <option value="false">否</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    曾做过的活动
                </th>
                <td class="formValue" colspan="5">
                    <textarea id="past_activities" name="past_activities" class="form-control" style="height: 60px;" placeholder="参考输入：保时捷汽车展 | 雪佛兰汽车展 | 某某大型服装秀"></textarea>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    空间介绍<span style="color:red">*</span>
                </th>
                <td class="formValue" colspan="5">
                    <textarea id="introduced" name="introduced" class="form-control required" style="height: 60px;" placeholder="参考填写：黑色无柱空间，可进车，适合举办各类时尚发布活动"></textarea>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">活动现场禁忌</th>
                <td class="formValue" colspan="5">
                    <textarea id="remark" name="remark" type="text" class="form-control" style="height:65px" placeholder="参考填写：截止房产类活动，亲子类活动，餐饮类油烟活动，地面必须保护覆盖等"></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="6" class="interval">价格相关</td>
            </tr>
            <tr>
                <th class="formTitle">价格是否含税<span style="color:red">*</span></th>
                <td class="formValue">
                    <select id="quote_explain" name="quote_explain" class="form-control required">
                        <option value="">==请录入价格是否含税==</option>
                        <option value="1">含税</option>
                        <option value="0">不含税</option>
                    </select>
                </td>
                <th class="formTitle">税点（%）</th>
                <td class="formValue">
                    <input id="c_month_price" name="c_month_price" type="number" class="form-control" placeholder="如不含税请输入，参考填写：6" />
                </td>
                <th class="formTitle">进场押金（元）</th>
                <td class="formValue">
                    <input id="deposit" name="deposit" type="number" class="form-control" placeholder="参考填写：30000" />
                </td>
            </tr>
            @*<tr>
                <th class="formTitle">本月推广价格</th>
                <td class="formValue">
                    <input id="c_month_price" name="c_month_price" type="number" class="form-control" placeholder="请录入本月推广价格" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">市场刊例价<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="market_price" name="market_price" type="number" class="form-control required" placeholder="请录入市场刊例价" />
                </td>
                <th class="formTitle">YUNSPACE价<span style="color:red">*</span></th>
                <td class="formValue">
                    <input id="inner_price" name="inner_price" type="number" class="form-control required" placeholder="请录入场地Yunspace价" />
                </td>
                <th class="formTitle">场地低价</th>
                <td class="formValue">
                    <input id="floor_price" name="floor_price" type="number" class="form-control" placeholder="请录入场地低价" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">搭建日市场刊例价</th>
                <td class="formValue">
                    <input id="price_market_build" name="price_market_build" type="number" class="form-control" placeholder="请录入搭建日市场刊例价" />
                </td>
                <th class="formTitle">搭建日Yunspace价</th>
                <td class="formValue">
                    <input id="price_build" name="price_build" type="number" class="form-control" placeholder="请录入搭建日Yunspace价" />
                </td>
                <th class="formTitle">搭建日底价</th>
                <td class="formValue">
                    <input id="price_floor_build" name="price_floor_build" type="number" class="form-control" placeholder="请录入搭建日底价" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">通宵搭建市场刊例价</th>
                <td class="formValue">
                    <input id="price_night_market_build" name="price_night_market_build" type="number" class="form-control" placeholder="请录入通宵搭建市场刊例价" />
                </td>
                <th class="formTitle">通宵搭建Yunspace价</th>
                <td class="formValue">
                    <input id="price_night_build" name="price_night_build" type="number" class="form-control" placeholder="请录入通宵搭建Yunspace价" />
                </td>
                <th class="formTitle">通宵搭建底价</th>
                <td class="formValue">
                    <input id="price_night_floor_build" name="price_night_floor_build" type="number" class="form-control" placeholder="请录入通宵搭建底价" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">新合作价格</th>
                <td class="formValue">
                    <input id="new_cooperation_price" name="new_cooperation_price" type="number" class="form-control" placeholder="请录入新合作价格" />
                </td>
                <th class="formTitle">专题价格</th>
                <td class="formValue">
                    <input id="special_price" name="special_price" type="number" class="form-control" placeholder="请录入专题价格" />
                </td>
                <th class="formTitle">场景品牌价格</th>
                <td class="formValue">
                    <input id="brand_price" name="brand_price" type="number" class="form-control" placeholder="请录入场景品牌价格" />
                </td>
            </tr>*@
            <tr>
                <th class="formTitle">利润率(%)</th>
                <td class="formValue">
                    <input id="porfit_rate" readonly name="porfit_rate" type="number" class="form-control" placeholder="请录入利润率" />
                </td>
                <td class="formTitle">订金收取方式：</td>
                <td class="formValue">
                    <select id="F_Subscription_Type" name="F_Subscription_Type" class="form-control">
                        <option value="">==请录入订金收取方式==</option>
                    </select>
                </td>
                <td class="formTitle">订金金额：</td>
                <td class="formValue">
                    <input id="F_Subscription_Price" name="F_Subscription_Price" type="number" class="form-control" placeholder="请录入订金金额" />
                </td>
            </tr>
        </table>
    </div>
</form>

<form id="form2">
    <table class="form">
        <tr>
            <td colspan="6" class="interval">商场特殊信息</td>
        </tr>
        <tr>
            <th class="formTitle">行业/品牌/活动类型排他</th>
            <td class="formValue">
                <input id="exclusiveness" name="exclusiveness" type="text" class="form-control" placeholder="请录入行业/品牌/活动类型排他" />
            </td>
            <th class="formTitle">起租天数</th>
            <td class="formValue">
                <input id="least_lease_days" name="least_lease_days" type="text" class="form-control" placeholder="请录入起租天数" />
            </td>
            <th class="formTitle">是否存在双拼</th>
            <td class="formValue">
                <input id="pair" name="pair" type="text" class="form-control" placeholder="请录入是否存在双拼" />
            </td>
        </tr>
        <tr>
            <td class="formTitle">商场定位：</td>
            <td class="formValue">
                <select id="F_StoreType" name="F_StoreType" multiple="multiple" class="form-control required">
                    <option value="">==请选择==</option>
                </select>
            </td>
            <td class="formTitle">客群定位：</td>
            <td class="formValue">
                <select id="F_GuestType" name="F_GuestType" multiple="multiple" class="form-control required">
                    <option value="">==请选择==</option>
                </select>
            </td>
            <td class="formTitle">商场人均消费：</td>
            <td class="formValue">
                <select id="F_Average_Consumer" name="F_Average_Consumer" class="form-control">
                    <option value="">==请选择==</option>
                </select>
            </td>
        </tr>
        <tr>
            <td class="formTitle">商场内品牌</td>
            <td class="formValue">
                <input id="sign_brand" name="sign_brand" type="text" class="form-control" placeholder="请录入商场内品牌" />
            </td>
            <th></th>
            <td></td>
        </tr>
    </table>
</form>

<div style="margin-bottom:30px;">
    <table class="form" style="margin-top:10px;">
        <tr>
            <td colspan="6" class="interval">空间照片</td>
        </tr>
        <tr>
            <th class="formTitle">图片上传(可多选)</th>
            <td class="formValue" colspan="2">
                <input id="PhotoFile" class="form-control" type="file" name="filesf" multiple />
            </td>
            <td colspan="3">
                <input id="F_FilesBtn" accept="image/png,image/jpeg,image/gif" onclick="uploadSend('PhotoFile','Space')" type="submit" value="上传图片" class="btn btn-primary" />
                <p id="tishi"></p>
            </td>
        </tr>
        <tr>
            <td colspan="4" id="pList">
                <div id="photoList" style="margin-left:40px;">
                </div>
            </td>
            <td colspan="2">
                <div id="displaydiv" style="display:none"></div>
                <p>
                    <span style="color:forestgreen">提示：</span>
                    为保证您所上传的图片资料给到客户更好的展示效果，请提供长宽比为4:3的常规横向展示照片，如上传的图片不符合这一要求，我们将会默认裁剪为适合的显示比例。
                    图片要求清晰，大小最小不低于XXKB ，最大单张大小不超过10MB
                </p>
            </td>
        </tr>
    </table>
</div>

<div style="margin-bottom:50px;">
    <table class="form" style="margin-top:10px;">
        <tr>
            <td colspan="6" class="interval">其他资料</td>
        </tr>
        <tr>
            <th class="formTitle">资料上传(可多选)</th>
            <td class="formValue" colspan="2">
                <input id="filesf" class="form-control" type="file" name="filesf" multiple />
            </td>
            <td>
                <input id="F_FilesBtn" onclick="uploadSend('filesf','SpaceFiles')" type="submit" value="提交资料" class="btn btn-primary" />
            </td>
            <td colspan="2">
                <p>
                    <span style="color:forestgreen">提示：</span>单个文件不要超过30MB
                </p>
            </td>
        </tr>
        <tr>
            <th class="formTitle"></th>
            <td colspan="3">
                <div id="imgrq"></div>
                <div id="imgrq1" style="margin-top:20px;"></div>
            </td>
        </tr>
    </table>
</div>

<script type="text/javascript">
    $('.clockpicker').clockpicker();
</script>
